#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<vector>

using namespace std;

int main()
{
	int x, n, l = 0, r = 0, cnt = 0, rl = 0, rr = 0,retlen = 0x3f3f3f3f;
	cin >> n >> x;
	vector<int> arr(n+1);

	for (int i = 1; i <= n; i++)
		cin >> arr[i];

	while (r <= n)
	{
		cnt += arr[r];

		while (cnt >= x)
		{
			if (r - l + 1 < retlen)
			{
				rr = r;
				rl = l;
				retlen = r - l + 1;
		    }
			cnt -= arr[l++];
		}
		r++;
	}
	cout << rl << " " << rr << endl;

	return 0;
}